package com.logistics.modules.transportationManagement.dao;
import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logistics.modules.transportationManagement.entity.CargoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 
 * 
 * @author HURRICANE
 * @email HURRICANE@nb.com
 * @date 2022-05-06 18:12:10
 */
@Mapper
public interface CargoDao extends BaseMapper<CargoEntity> {

    IPage<CargoEntity> selectAll(@Param("page") IPage<CargoEntity> page,
                                 @Param("cargoType") Integer cargoType,
                                 @Param("cargoName") String cargoName);

    CargoEntity selectOneById(@Param("id") Integer id);

    int countByCargoTypeId(@Param("cargoTypeId") Integer cargoTypeId);

}
